<html>
<head><meta charset="utf-8"><title>Chalk/rustc lifetime parity · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html">Chalk/rustc lifetime parity</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214509022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509022">(Oct 25 2020 at 20:00)</a>:</h4>
<p>Do we plan on adding a <code>ReErased</code> equivalent to chalk</p>



<a name="214509030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509030">(Oct 25 2020 at 20:00)</a>:</h4>
<p>I didn't think so?</p>



<a name="214509046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509046">(Oct 25 2020 at 20:01)</a>:</h4>
<p>I guess, we haven't really discussed that, or <code>ReFree</code></p>



<a name="214509124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509124">(Oct 25 2020 at 20:02)</a>:</h4>
<p>For testing, these can be unit tests. You'll probably want to use the <a href="https://github.com/rust-lang/chalk/blob/master/chalk-integration/src/test_macros.rs">macros</a> to construct types and assert that the right flags are assigned</p>



<a name="214509147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509147">(Oct 25 2020 at 20:03)</a>:</h4>
<p>Though, those are quite limited, so you'll either want to extend them a bit or just manually write the types/lifetimes</p>



<a name="214509388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509388">(Oct 25 2020 at 20:08)</a>:</h4>
<p>Well, if the plan is to have rustc use chalk-ir types then chalk-ir will need <code>ReErased</code> (and probably <code>ReEmpty</code>)</p>



<a name="214509396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509396">(Oct 25 2020 at 20:08)</a>:</h4>
<p><code>ReFree</code> and <code>ReEarlyBound</code> should be possible to remove from rustc.</p>



<a name="214509615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509615">(Oct 25 2020 at 20:13)</a>:</h4>
<p>So what exactly are <code>ReErased</code> and <code>ReEmpty</code> <em>for</em>?</p>



<a name="214509627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509627">(Oct 25 2020 at 20:13)</a>:</h4>
<p><code>ReErased</code>, from what minimal I know, it used in MIR I think?</p>



<a name="214509688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509688">(Oct 25 2020 at 20:14)</a>:</h4>
<p>And then <code>ReEmpty</code> is for lifetimes that are "used" right? Not sure if I'm close here.</p>



<a name="214509929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509929">(Oct 25 2020 at 20:19)</a>:</h4>
<p><code>ReErased</code> is used when the value of a lifetime doesn't matter (after borrow checking)</p>



<a name="214509989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214509989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214509989">(Oct 25 2020 at 20:20)</a>:</h4>
<p><code>ReEmpty</code> is used by lexical region inference, which needs a minimal value for lifetimes before any outlives constraints are considered.</p>



<a name="214510081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214510081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214510081">(Oct 25 2020 at 20:22)</a>:</h4>
<p>hmm</p>



<a name="214510186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214510186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214510186">(Oct 25 2020 at 20:25)</a>:</h4>
<p>(I moved this to a new topic)</p>



<a name="214510193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214510193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214510193">(Oct 25 2020 at 20:25)</a>:</h4>
<p>Maybe we should discuss this Tuesday</p>



<a name="214758853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Chalk/rustc%20lifetime%20parity/near/214758853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Chalk.2Frustc.20lifetime.20parity.html#214758853">(Oct 27 2020 at 20:22)</a>:</h4>
<p>would be nice to remove <code>ReEmpty</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>